home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / src / gitmount < prev    next >
Encoding:
Text File  |  1995-07-10  |  1.3 KB  |  41 lines

  1. #!/bin/sh
  2.  
  3. ###############################################################################
  4. #                                                                             #
  5. #                 GNU Interactive Tools 4.3.7 auto-mount script               #
  6. #               Copyright (C) 1994 Free Software Foundation, Inc.             #
  7. #                   Written by Tudor Hulubei and Andrei Pitis.                #
  8. #                                                                             #
  9. ###############################################################################
  10.  
  11. #
  12. # This script is for Linux only.
  13. # The ideea of this script is quite general but the script needs
  14. # some changes in order to run on other UNIX systems.
  15. # The major change is in the file system types list.
  16. #
  17. # If you enhance this script, please send me a patch (tudor@chang.pub.ro).
  18. # I'll include it in the next release.
  19. #
  20.  
  21. name=`basename $0`
  22.  
  23. if test $# != 1; then
  24.     echo usage: $name device  "    (ex:  " $name fd0 ")"
  25.     exit 1
  26. fi
  27.  
  28. for fstype in ext2 msdos minix ext xiafs hpfs
  29. do
  30.     echo checking for $fstype file system ...
  31.     mount -t $fstype /dev/$1 /mnt/$1 > /dev/null 2> /dev/null
  32.     ok=$?
  33.     if test $ok = 0; then
  34.         echo $fstype file system succesfully mounted
  35.         exit 0
  36.     fi
  37. done
  38.  
  39. echo wrong fs type, /dev/$1 already mounted, /mnt/$1 busy, or other error >&2
  40. exit 1
  41.